package services

import com.jfinal.core.Controller
import utils.LogUtil

abstract class BaseService<T: Controller> {
    protected var controller: T

    constructor(controller: T){
        this.controller = controller
    }

    protected fun renderJsonWithLog(tag: String, json: String){
        if (LogUtil.DEBUG){
            LogUtil.i(tag, json)
        }
        controller.renderJson(json)
    }
}